1. Field of the Invention
The present invention relates to a process scheduling apparatus, a process scheduling method, a program for process scheduling, and a storage medium for recording a program for process scheduling to enable efficient and appropriate scheduling in a multiprocessing environment.
2. Description of Related Art
Computers are increasingly commonly used in many fields such as home appliances and cell phones in addition to applications in fields such as mainframe computers and personal computers.
Multiprocessing is a known technique used for efficient processing in a computer. In the multiprocessing, for achievement of parallel processing, a program is divided into multiple execution units called processes, threads, or tasks (referred to herein as processes), and scheduling of the execution units is executed according to the priority assigned to each process. However, even in a multiprocessing environment, all execution units are not uniformly executed as the processes but many execution units run in a form other than the process. For example, execution units for processing an interrupt request (referred to as interrupt handlers) are not executed as the process. Furthermore, the part of the interrupt handler not requiring real-time execution is often executed in a form other than the process at the appropriate timing.
In order to determine which tasks executed in the form other than the process, such as the part of the interrupt handler not requiring real-time processing (referred to herein as a “delayed task”) and the process should be executed by priority, a process scheduling in which priorities are assigned to delayed tasks as well as processes can be considered. With respect to such process scheduling, for example, Japanese Patent Application Laid-open Publication No. 62-42251 discloses an event scheduling method for queuing events after they are prioritized and then running the processes related to the events sequentially from high to low priority. This event scheduling method could be further developed to a scheduling of the processes and the delayed tasks by treating the events as the delayed tasks and handling an activated process by the event as an actual process corresponding to the delayed task.
However, since the event scheduling method disclosed in No. 62-42251 is not assumed to be used in a multiprocessing environment, the method cannot efficiently and appropriately schedule the processes and the delayed tasks. Specifically, if the method would be applied to a multiprocessing environment, one process had to be linked to each event. Running a different process for every event in the multiprocessing environment means that a large number of processes will be run and it will be necessary to repeatedly create and delete the processes in a short interval. Due to the repeat of creation and deletion of the processes in a short interval, heavy load is applied to a computer. Further, scheduling takes longer as the number of executing processes increases, and more memory is needed for process management.